import request from '@/utils/request'

// 查询项目自检列表
export function listCheck(query) {
  return request({
    url: '/check/check/list',
    method: 'get',
    params: query
  })
}

// 查询项目自检详细
export function getCheck(id) {
  return request({
    url: '/check/check/' + id,
    method: 'get'
  })
}

// 新增项目自检
export function addCheck(data) {
  return request({
    url: '/check/check',
    method: 'post',
    data: data
  })
}

// 修改项目自检
export function updateCheck(data) {
  return request({
    url: '/check/check',
    method: 'put',
    data: data
  })
}

// 删除项目自检
export function delCheck(id) {
  return request({
    url: '/check/check/' + id,
    method: 'delete'
  })
}

// 检查类型下拉树
export function treeselect(data){
  return request({
    url: '/common/type/treeselect',
    method: 'POST',
    data: data
  })
}

// 隐患详情
export function lookRecordData(params){
  return request({
    // url: '/record/record/' + id,
    url: "/quality/qualityFileItem/list",
    method: 'get',
    params,
  })
}